package com.fowo.api.model.bd.rate;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 汇率 导入导出辅助模型 */
@Getter
@Setter
public class BdRateExcelPo {

  @Size(max = 60, message = "原币长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "原币")
  private String name;

  @Size(max = 50, message = "原币编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "原币编码")
  private String code;

  @NotBlank(message = "英文缩写不能为空")
  @Size(max = 50, message = "英文缩写长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*英文缩写")
  private String rateEg;

  @NotNull(message = "金蝶汇率不能为空")
  @Size(max = 50, message = "金蝶汇率长度不能超过20")
  @NumberFormat("0.0000")
  @ExcelProperty(value = "*金蝶汇率")
  private java.math.BigDecimal rateNum;

  @Size(max = 50, message = "目标币长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "目标币")
  private String targetName;

  @ExcelProperty(value = "官方汇率")
  private java.math.BigDecimal officialRate;

  @ExcelProperty(value = "我的汇率")
  private java.math.BigDecimal myRate;

  @Size(max = 50, message = "生效月份长度不能超过20")
  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "生效月份")
  private java.util.Date date;
}
